<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>相对定位和决定定位</title>
    <style>
        div{
            height: 80px;
            width: 80px;
            background-color: red;
            margin: 5px;
            float: left;
        }

        /*绝对定位*/
        #div1{
            position: absolute;
            left: 500px;
            top: 300px;
            z-index: 9;
            border-radius: 15px 40px;
        }
        /*相对定位*/
        #div2{
            position: relative;
            left: 450px;
            top: 350px;
            background-color: blue;
            z-index: -10;
        }
    </style>
</head>
<body>
<div id="div1">
div1

</div>
<div id="div2">
div2

</div>
<div id="div3">
div3

</div>
<div id="div4">
div4

</div>
</body>
</html>